
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreCombinationRequest struct {

	ProductId string `json:"product_id" form:"product_id"`

	MerId string `json:"mer_id" form:"mer_id"`

	Image string `json:"image" form:"image"`

	Images string `json:"images" form:"images"`

	Title string `json:"title" form:"title"`

	Attr string `json:"attr" form:"attr"`

	People string `json:"people" form:"people"`

	Info string `json:"info" form:"info"`

	Price string `json:"price" form:"price"`

	Sort string `json:"sort" form:"sort"`

	Sales string `json:"sales" form:"sales"`

	Stock string `json:"stock" form:"stock"`

	AddTime string `json:"add_time" form:"add_time"`

	IsHost string `json:"is_host" form:"is_host"`

	IsShow string `json:"is_show" form:"is_show"`

	IsDel string `json:"is_del" form:"is_del"`

	Combination string `json:"combination" form:"combination"`

	MerUse string `json:"mer_use" form:"mer_use"`

	IsPostage string `json:"is_postage" form:"is_postage"`

	Postage string `json:"postage" form:"postage"`

	StartTime string `json:"start_time" form:"start_time"`

	StopTime string `json:"stop_time" form:"stop_time"`

	EffectiveTime string `json:"effective_time" form:"effective_time"`

	Cost string `json:"cost" form:"cost"`

	Browse string `json:"browse" form:"browse"`

	UnitName string `json:"unit_name" form:"unit_name"`

	TempId string `json:"temp_id" form:"temp_id"`

	Weight string `json:"weight" form:"weight"`

	Volume string `json:"volume" form:"volume"`

	Num string `json:"num" form:"num"`

	OnceNum string `json:"once_num" form:"once_num"`

	Quota string `json:"quota" form:"quota"`

	QuotaShow string `json:"quota_show" form:"quota_show"`

	Virtual string `json:"virtual" form:"virtual"`

	Logistics string `json:"logistics" form:"logistics"`

	Freight string `json:"freight" form:"freight"`

	CustomForm string `json:"custom_form" form:"custom_form"`

	VirtualType string `json:"virtual_type" form:"virtual_type"`

	IsCommission string `json:"is_commission" form:"is_commission"`

	HeadCommission string `json:"head_commission" form:"head_commission"`

}

func (r *StoreCombinationRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreCombinationRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"product_id": "required",

		"mer_id": "required",

		"image": "required",

		"images": "required",

		"title": "required",

		"attr": "required",

		"people": "required",

		"info": "required",

		"price": "required",

		"sort": "required",

		"sales": "required",

		"stock": "required",

		"add_time": "required",

		"is_host": "required",

		"is_show": "required",

		"is_del": "required",

		"combination": "required",

		"mer_use": "required",

		"is_postage": "required",

		"postage": "required",

		"start_time": "required",

		"stop_time": "required",

		"effective_time": "required",

		"cost": "required",

		"browse": "required",

		"unit_name": "required",

		"temp_id": "required",

		"weight": "required",

		"volume": "required",

		"num": "required",

		"once_num": "required",

		"quota": "required",

		"quota_show": "required",

		"virtual": "required",

		"logistics": "required",

		"freight": "required",

		"custom_form": "required",

		"virtual_type": "required",

		"is_commission": "required",

		"head_commission": "required",

	}
}

func (r *StoreCombinationRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreCombinationRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreCombinationRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
